package com.yazi.mxz.common.entity.beans;

import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 * MemberNoticeId entity. @author MyEclipse Persistence Tools
 */
@Embeddable
public class MemberNoticeId implements java.io.Serializable {

	// Fields

	private Long memberId;
	private Long noticeId;

	// Constructors

	/** default constructor */
	public MemberNoticeId() {
	}

	/** full constructor */
	public MemberNoticeId(Long memberId, Long noticeId) {
		this.memberId = memberId;
		this.noticeId = noticeId;
	}

	// Property accessors

	@Column(name = "MEMBER_ID", nullable = false, precision = 15, scale = 0)
	public Long getMemberId() {
		return this.memberId;
	}

	public void setMemberId(Long memberId) {
		this.memberId = memberId;
	}

	@Column(name = "NOTICE_ID", nullable = false, precision = 15, scale = 0)
	public Long getNoticeId() {
		return this.noticeId;
	}

	public void setNoticeId(Long noticeId) {
		this.noticeId = noticeId;
	}

	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof MemberNoticeId))
			return false;
		MemberNoticeId castOther = (MemberNoticeId) other;

		return ((this.getMemberId() == castOther.getMemberId()) || (this
				.getMemberId() != null && castOther.getMemberId() != null && this
				.getMemberId().equals(castOther.getMemberId())))
				&& ((this.getNoticeId() == castOther.getNoticeId()) || (this
						.getNoticeId() != null
						&& castOther.getNoticeId() != null && this
						.getNoticeId().equals(castOther.getNoticeId())));
	}

	public int hashCode() {
		int result = 17;

		result = 37 * result
				+ (getMemberId() == null ? 0 : this.getMemberId().hashCode());
		result = 37 * result
				+ (getNoticeId() == null ? 0 : this.getNoticeId().hashCode());
		return result;
	}

}